<template>
    <view>
		<fui-sticky>
			<!-- #ifdef H5 -->
			<fui-nav-bar title="帮助中心" @leftClick="leftClick">
				<fui-icon name="arrowleft"></fui-icon>
			</fui-nav-bar>
			<!-- #endif -->
			
		</fui-sticky>
		<fui-collapse accordion>
			<fui-collapse-item :index="index" v-for="(item,index) in data" :key="index">
				<view class="fui-item__box">
					<view style="font-weight: bold;">
						{{item.name}}
					</view>
				</view>
				<template v-slot:content>
					<view class="fui-item__box1">
						<rich-text :nodes="item.htmlContent"></rich-text>
					</view>
				</template>
			</fui-collapse-item>
		</fui-collapse>
    </view>
</template>

<script setup>
	const getSystem = uniCloud.importObject('admin-system',{customUI: true})
    import { ref, reactive } from 'vue'
    import { onLoad } from "@dcloudio/uni-app";
	
	const data = ref([])
	
	onLoad(async()=>{
		const res = await getSystem.getAssist()
		data.value = res.data
	})
	
	// #ifdef H5
	const leftClick = ()=>{
		uni.navigateBack()
	}
	// #endif
	
</script>

<style lang="scss" scoped>
	.fui-item__box1{
		padding: 22rpx 32rpx 22rpx 32rpx;
	}
	.fui-item__box{
		padding: 32rpx;
	}
	.htmlContent{
		padding: 20rpx;
	}
</style>
